'use strict';

angular.module('fbdApp.testTextModule')

.controller('textCtrl', function($scope, shareData) {

  $scope.text = {};

  $scope.text.type = $scope.testType;
  if ($scope.testType == 'file') {
    $scope.text.content = shareData.fileName;
    $scope.fileName = shareData.realFileName;
  }
  if ($scope.testType == 'string') {
    // $scope.articleList = shareData.articleList;

    $scope.articleList = [{
      text: '123123123123',
      location: '123'
    }, {
      text: '13333333',
      location: '222'
    }];

  }

  $scope.testData = $scope.text;

  // $scope.showArticle = function() {
  //
  // };
  // console.log($scope.text, 'text');
  // if ($scope.testType == 'file') {

  // }

  // $scope.change = function() {
  //   // console.log($scope.testType);
  //   $scope.testType = 'string';
  // }
  // $scope.testType = 'string';
  // console.log($scope.testType);

});
